Problem when using ajax for refresh captcha with refresh button [closed]
Posted
by
jowan
on Pro Webmasters
See other posts from Pro Webmasters
or by jowan
Published on 2010-12-28T01:50:55Z
Indexed on
2010/12/28
2:00 UTC
Read the original article
Hit count: 649
But it doesn't work, I just get my image be vanished and I try METHOD 2, I think it can work but I'm wrong coz i just get display with code of image not new captcha image I am stack and confuse about what method exactly work to refresh my own captcha..
Any wrong in my code or my method can't be used to refresh captcha.. Could anyone tell me how to refresh captcha exactly ?
Thanks in Advance
JQUERY CODE
$('.refresh_captcha').click( function(){
$.ajax({
type: 'POST',
url: 'captcha_mk.php',
success: function(data){
//$('img').attr('src', data); // METHOD 1 ( I try it and my image is lost )
$('div').html('<img src=' + data); // METHOD 2 ( display code of image not captcha image)
}
});
});
© Pro Webmasters or respective owner